#include "uart.h"
#include "init.h"
#include "nand.h"
#include "lcd/lcd.h"

extern void boot_kernel(void);

int main(void)
{
	unsigned char c;
	uart0_init();
				//sdram_init();
	puts("hello world !!\n\r");
	//nand_init();
	//nand_read_id();
	//nand_erase(0x1, 0x1);
	//if(sdram_init_test() == 1)
	//{
	led_test();
	lcd_test();
	//}

	//led_test();
	while(0)
	{
		c = getchar();
		if(c == '\r')
			putchar('\n');
		if(c == '\n')
			putchar('\r');
		putchar(c);

		if(c >= '0' && c <= '7')
		{
			access_test_init(c-'0');
			led_test();
		}
		else
		{
			puts("Error val should be between 0 ~ 7 \r\n");
			puts("Enter the Tacc val : \r\n");
		}
	}

	boot_kernel();
	
	while(1);
	return 0;
}

